home *** CD-ROM | disk | FTP | other *** search
/ Commodore Free 38 / Commodore_Free_Issue_38_2010_Commodore_Computer_Club.d64 / minigrafik 2 < prev    next >
Text File  |  2023-02-26  |  5KB  |  190 lines

  1.  
  2.  
  3.  
  4. *************************************
  5.       MINIGRAFIK FOR THE VIC 20
  6. *************************************
  7.  
  8. http://www.sleepingelephant.com/
  9. ipw-web/bulletin/bb/viewtopic.
  10. php?t=952&start=49
  11.  
  12. New version 4.02 of MINIGRAFIK!
  13.  
  14. Improvements to version 3.2:
  15.  
  16. - The @ command (point plot, line
  17.   draw), and the @() function have
  18.   been extended to support
  19.   Multi-Colour mode.
  20.  
  21. - @SAVE, @LOAD command added (see
  22.   below)
  23.  
  24. - faster start-up time
  25.  
  26. Symbol explanations:
  27.  
  28. <...> denotes parameter expressions
  29. [...] denotes optional parts of a
  30. parameter list
  31.  
  32. Commands:
  33.  
  34. @ON initialises the 160x192 pixel
  35. graphics. The screen is recentered
  36. correctly regardless of MINIGRAFIK
  37. running on a NTSC or PAL VIC.
  38.  
  39. @CLR clears the hires screen.
  40. Furthermore the Colour RAM is
  41. initialised to the foreground colour.
  42.  
  43. @RETURN returns to text mode. If an
  44. error occurs during program
  45. execution, this command is executed
  46. on your behalf before outputting the
  47. error message.
  48.  
  49. @<colour>,<x>,<y> [TO <x2>,<y2>]
  50.  
  51. Draw line in <colour> from (<x>,<y>)
  52. to (<x2>,<y2>). If the TO part is
  53. omitted, a single point at (<x>,<y>)
  54. is plotted.
  55.  
  56. <colour> denotes a logical colour.
  57. <x> and <x2> may range from 0 to
  58. 159, <y> and <y2> from 0 to 191. The
  59. origin (x=0, y=0) lies in the
  60. top-left corner. All arguments can
  61. be written as numbers, variables, or
  62. arbitrary numeric expressions.
  63.  
  64. In High-Resolution mode (M=0) the
  65. allowed logical colours are:
  66.  
  67. 0: clear pixel to background colour G
  68. 1: set pixel in foreground colour F
  69.  
  70. In Multi-Colour mode (M=1) two extra
  71. logical colours become available:
  72.  
  73. 2: set pixel in border colour B
  74. 3: set pixel in auxiliary colour A
  75.  
  76. In Multi-Colour mode the resolution
  77. is halved, so that when <x> is even,
  78. <x> and <x>+1 address the same pixel.
  79.  
  80. The foreground colour (F=0..7) and
  81. Multi-Colour enable (M=0..1) are set
  82. individually for each 8x16 pixel
  83. cell. The background colour
  84. (G=0..15), border colour (B=0..7),
  85. and auxiliary colour (A=0..15) apply
  86. to the whole screen.
  87.  
  88. To assign a physical colour to the
  89. logical colours, issue the following
  90. POKEs:
  91.  
  92. POKE 36879,16*G+8+B
  93.   (set background, and border colour)
  94. POKE 36878,16*A
  95.   (set auxiliary colour)
  96. POKE 646,8*M+F
  97.   (set foreground colour, and
  98.   enable/disable MC mode)
  99.  
  100. Physical Colour Table:
  101.  0  Black        8  Orange
  102.  1  White        9  Light Orange
  103.  2  Red         10  Light Red
  104.  3  Cyan        11  Light Cyan
  105.  4  Purple      12  Light Purple
  106.  5  Green       13  Light Green
  107.  6  Blue        14  Light Blue
  108.  7  Yellow      15  Light Yellow
  109.  
  110. @SAVE [<filename> [,<device>]]
  111.  
  112. Save screen to device. A
  113. device-number greater than or equal
  114. 8 addresses the disc drive. In that
  115. case a filename must be given.
  116.  
  117. If the device-number is omitted, or
  118. equal 1, the screen is saved to
  119. tape. @SAVE without any parameters
  120. saves an unnamed screen to tape. A
  121. tape save notifies the user with a
  122. border flashing black/red to press
  123. RECORD & PLAY on the tape drive.
  124. When the save has completed, your
  125. program continues execution.
  126.  
  127. The file contains a stand-alone
  128. display routine, to view the image
  129. via LOAD and RUN without MINIGRAFIK
  130. in memory. If MINIGRAFIK is loaded,
  131. use @LOAD instead, inside a program.
  132.  
  133. Memory Map:
  134. MINIGRAFIK   MINIGRAFIK
  135. active       not active
  136. -----------  -----------  -----------
  137. $1000-$10EF               char map
  138. $10F0                     free
  139. $10F1-$10FD  $1201-$120D  SYS 8584
  140. $10FE        $120E        36878 reg
  141. $10FF        $120F        36879 reg
  142. $1100-$1FFF  $1210-$210F  bitmap
  143. $2000-$2077  $2110-$2187  colour
  144. $2078-$20EF  $2188-$21FF  display prg
  145.  
  146. @LOAD [<filename> [,<device>]]
  147.  
  148. Load screen from device. A
  149. device-number greater than or equal
  150. 8 addresses the disc drive. In that
  151. case a filename must be given.
  152.  
  153. If the device-number is omitted, or
  154. equal 1, the screen is loaded from
  155. tape. @LOAD without any parameters
  156. loads the next screen from tape. A
  157. tape load notifies the user with a
  158. border flashing black/green to press
  159. PLAY on the tape drive.
  160.  
  161. When the load has completed, the
  162. image is displayed on screen, and
  163. your program continues execution
  164. after the @LOAD command. There is no
  165. wait for a key press.
  166.  
  167. DO NOT load anything else than a
  168. @SAVEd screen with @LOAD!
  169.  
  170. Functions:
  171.  
  172. @(<x>,<y>)
  173.  
  174. This function returns the logical
  175. colour at (<x>,<y>). <x> may range
  176. from 0 to 159, <y> from 0 to 191.
  177. Both arguments can be written as
  178. numbers, variables, or arbitrary
  179. numeric expressions.
  180.  
  181. For a High-Resolution 8x16 pixel
  182. cell, the function returns 0 for
  183. background, and 1 for foreground
  184. colour. If the cell is Multi-Colour
  185. and <x> is even, then <x> and <x>+1
  186. share the same logical colour, & you
  187. must be prepared for the function to
  188. return values from 0 to 3.
  189. ===================================
  190.